window.initChart = (id, option) => {
    const chart = echarts.init(document.getElementById(id));
    chart.setOption(option);
    return chart;
};